#!/usr/bin/php -q
<?
echo "plugin_setinfo debug foo 1\n";
//echo "command_add debug_set debug_set\n";
//echo "command_add debug_get debug_get\n";
//$debug_level = 0;
echo "event_listen  \n";
for(;;){
    stream_select($arr=array(STDIN),$b=NULL,$c=NULL,NULL);
    if (isset($arr[0])){
        $o = fread($arr[0],128);
        $boom = explode(" ",$o);
        switch($boom[0]){
        case 'evt':
            echo "debug: ".$o;
            break;
        default:
            echo "wtf\n";
        }
    }
}
?>
